<?php if(!$user->isLogged() && $_GET['p'] == 'activate'){ ?>
	<div id="containercenter">
		<div id="containerleft">
		
		</div>
		<div id="containerright">
			<?php require('php/pages/activate.php'); ?>	
		</div>
	</div>
<?php }else if(!$user->isLogged()){ ?>

	<div id="containercenter">
		<div id="containerleft">
		
		</div>
		<div id="containerright">
			<?php 
				if(isset($_REQUEST['reg_submit'])){
					if(count($errors)==0){
						require('php/pages/confirm.php');
					}else{
						require('php/pages/registrationForm.php');
					}
					
				}else{
					require('php/pages/registrationForm.php');
				}
			?>	
		</div>
		<span id="containerright_options">
			<?php 
				if(count($errors)>0 && !isset($errors['login'])){
					include('php/pages/registrationErrorBox.php');
				}
			?>
			
		</span>
	</div>
	
<?php }else{
	if(!isset($_GET['p'])) { 
		$_GET['p'] = 'home'; 
	}
		
	switch($_GET['p']) {
    	case 'home':
			include('php/pages/home.php');
   		break;
   		case 'profile':
			include('php/pages/profile.php');
   		break;
   		case 'blackjack':
			include('php/pages/blackjack.php');
   		break;
   		case 'credits':
			include('php/pages/credits.php');
   		break;
   		case 'checkout':
			include('php/pages/checkout.php');
   		break;
   		
    	default:
			echo '<p>';
				include('php/pages/notFound.php');
  			echo '</p>';
   		break;
	
 	}
	
}
?>	

	